//
// Created by Castle-Moriarty on 2025/10/31.
//

#include <iostream>
using namespace std;

double sum (double scores[],size_t count) {
    double sum{};

    for (size_t i{0};i < count;++i) {
        sum += scores[i];
    }
    return sum;
}

double sumPointer (double* scores,size_t count) {
    double sum{};

    for (size_t i{0};i < count;++i) {
        sum += scores[i];
    }
    return sum;
}

int main() {
    double scores[] = {1.1,2.2,3.3};

    cout << sum(scores,size(scores)) << endl;
    return 0;
}